package com.mmd.service.impl;



import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;

import com.mmd.bean.AdminInfoBean;
import com.mmd.db.DBProvider;
import com.mmd.service.ILoginService;
import com.mmd.utils.Myutils;





public class LoginServiceimpl implements ILoginService {

	@Override
	public List<AdminInfoBean> queryLoginInfo(AdminInfoBean adminB) {
		// 调用db层进行数据库操作
		//登录查询语句
		String sql="select * from admininfo where adminName=? and adminpsw=?";
		//调用db层进行数据库查询操作
		List<AdminInfoBean> lstAdmins= Myutils.getInstance(DBProvider.class).query(sql, new BeanListHandler<>(AdminInfoBean.class), adminB.getHost_name(),adminB.getHost_psw());
		//返回结果
		return lstAdmins;
	}

}
